CVE-2026-40393 part 1 - out-of-bounds memory access in WebGPU
Origin: https://gitlab.freedesktop.org/mesa/mesa/-/commit/
978fd42b4b7d1e9c0435ffa7e1a4d339cba9b76e
From
978fd42b4b7d1e9c0435ffa7e1a4d339cba9b76e Mon Sep 17 00:00:00 2001
From: Ian Romanick <ian.d.romanick@intel.com>
Date: Fri, 23 Jan 2026 09:58:26 -0800
Subject: [PATCH] spirv: Use STACK_ARRAY instead of NIR_VLA
The number of fields comes from the shader, so it could be a value large
enough that using alloca would be problematic.
Fixes: 2a023f30a64 ("nir/spirv: Add basic support for types")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit
3da828d2dd12e20ba2afc152db8d7236c7a48c13)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
Gbp-Pq: Name CVE-2026-40393-part1.patch